/*
 * 设置路由步骤
 * 1.编写组件及其对应的组件说明页面
 * 2.在这里注册对应的路由名称和组件
 * 3.在homeNav.ts内navArray中添加自己的组件及组件名称
 * !!! 注意说明页面 Component 的 name 属性不要和组件的 name 属性重复了，不然会报错
 */
import { createWebHashHistory, createRouter } from 'vue-router'

export default createRouter({
  history: createWebHashHistory('Easy-UI/'),
  routes: [
    {
      path: '/',
      redirect: '/index',
    },
    {
      path: '/index',
      name: 'nav',
      component: () => import('/@/document/Nav.vue'),
    },
    {
      path: '/introduct',
      name: 'home',
      component: () => import('/@/document/Home.vue'),
    },
    {
      path: '/button',
      name: 'button',
      component: () => import('/@/document/Button.vue'),
    },
    {
      path: '/icon',
      name: 'icon',
      component: () => import('/@/document/Icon.vue'),
    },
    {
      path: '/switch',
      name: 'switch',
      component: () => import('/@/document/Switch.vue'),
    },
    {
      path: '/input',
      name: 'input',
      component: () => import('/@/document/Input.vue'),
    },
    {
      path: '/test',
      name: 'test',
      component: () => import('/@/document/Test.vue'),
    },
  ],
})
